<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>竞猜记录</title>
		
		
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<!-- jQuery文件。务必在bootstrap.min.js之前引入 -->
		<script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
		
		<link rel="stylesheet" href="__STATIC__/jcweb/css/base.css" />		
		
		<link rel="stylesheet" href="__STATIC__/jcweb/css/my.css" />	
		<script src="__STATIC__/jcweb/js/utils.js"></script>	
		{include file="public/wxopera" /}	
	</head>
	<body>
		
		{include file="public/footer" /}		
		
		<section class="sectionContent">
			
			<div id="history_div">
			{volist name="data" id="v"}
			<div class="guessingline">
					<div>
						<font class="floatLeft">{$v['name']}</font>期
					<font class="floatRight">{$v['create_time']}</font>
					</div>
					
					<div class="flex v-center">
						<div class="">
							<div class=" margin-top10" >
							{if($v['type']==1)}
							大小场
							{/if}
							{if($v['type']==2)}
							大小单双场
							{/if}
							{if($v['type']==3)}
							精确场
							{/if}
							</div>
					<div class="" style="margin-top: 5px;">下注金额:{$v['money']/100}欢乐币</div>
						</div>
						<div class="flex-1">
						{if($v['is_ying']==1)}
						<font class="floatRight margin-top10"style="color: red;font-size: 2.5rem;">恭喜获得{$v['ying_money']}欢乐币</font>
						{else}
						<font class="floatRight margin-top10"style="color: green;font-size: 2.5rem;">输掉{$v['ying_money']}欢乐币</font>
						{/if}
						
							
						</div>
					</div>
					
					<div class="flex margin-top10">
					<font class="floatLeft flex-1" >竞猜信息:{$v['jc_name']}</font>
					<font class="floatLeft flex-1">开奖号码:{$v['result']}</font>
					<font class="floatRight flex-1">开奖结果:{$v['res_name']}</font>
					</div>
			</div>
			{/volist}
			</div>
			{if(count($data)==0)}
			<img src="__STATIC__/jcweb/img/nodata.jpg" class="fill-w"/>
			
			{else}
			<div id="more" class="flex h-center v-center" style="height:40px;background:#ccc">
				查看更多
				</div>
			
			{/if}
			
			
			
		</section>	
	<input type="hidden" id="pages" value="{$page}" />
		<script>
		$(function(){
		$("#more").click(function(){
		var apihost = "{$apihost}";
		var pages = parseInt($("#pages").val())+1;
		var  url= apihost+"getJcMeHis";
		post2(url,{page:pages},function(data){
		if(data.length<10){
		$("#more").unbind("click");
		$("#more").text("没有更多了");
		}else{
		$("#pages").val(pages);
		}
		for(var i=0;i<data.length;i++){
			
			var type_name ="";
			if(data[i]['type']==1){
				type_name ="大小场";
			}if(data[i]['type']==2){
				type_name ="大小单双场";
			}if(data[i]['type']==3){
				type_name ="精确场";
			}
			var tmps = '';
			if(data[i]['is_ying']==1){
				tmp='<font class="floatRight margin-top10"style="color: red;font-size: 2.5rem;">恭喜获得'+data[i]['ying_money']+'欢乐币</font>';
			}else{
				tmp='<font class="floatRight margin-top10"style="color: green;font-size: 2.5rem;">输掉'+data[i]['ying_money']+'欢乐币</font>';
			}
			
			
			
		var html='<div class="guessingline"><div><font class="floatLeft">'+data[i]['name']+'</font>期<font class="floatRight">'+data[i]['create_time']+'</font>'+
	'</div><div class="flex v-center"><div class=""><div class=" margin-top10" >'+type_name+'</div>'+
	'<div class="" style="margin-top: 5px;">下注金额:'+(data[i]['money']/100)+'欢乐币</div></div><div class="flex-1">'+
	tmp+'</div></div><div class="flex margin-top10"><font class="floatLeft flex-1" >竞猜信息:'+data[i]['jc_name']+'</font>'+
	'<font class="floatLeft flex-1">开奖号码:'+data[i]['result']+'</font>'+
	'<font class="floatRight flex-1">开奖结果:'+data[i]['res_name']+'</font></div></div>';
		$("#history_div").append(html);
		
		
		
		}
		
		});
		
		});
		});
		</script>	
	</body>
</html>
